package com.nm.commons.exception;

/**
 * Created by hewu on 2017/2/9 0009.
 */
public enum ErrorsDispatcher {

    InternalError(-1, "内部服务异常"),

    //菜单错误码 1000- 1100
    FailUpdateMenu(1000, "菜单修改失败"),

    FailAddMenu(1001, "菜单新增失败"),

    FailQueryMenu(1002,"菜单查询失败");


    private int code;

    private String msg;

    private ErrorsDispatcher(int code, String msg) {
        this.msg = msg;
        this.code = code;
    }

    public SupperException direct(int code, String msg) {
        return new SupperException(code, msg);
    }

    public SupperException e() {

        return new SupperException(code, msg);
    }

    /////////////  get  ////////////
}
